package com.xiaowan.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;


public class MyWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

    /**
     * 配置父容器--spring
     * @return
     */
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{AppConfig.class};
    }

    /**
     * 配置servlet容器(子容器)--springMvc
     * @return
     */
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{WebConfig.class};
    }

    /**
     * @Description 指定DispatcherServlet 请求路径
     * @Author wbm
     * @Date 上午 10:10 2019/11/18
     **/
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
